package org.goyo.main.domain.entity.base;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import org.goyo.main.domain.entity.BaseEntryObject;

/**
 * 供应商财务资料
 * 
 * @author chenchuan
 * 2014年11月11日
 */
@Entity
public class SupplierFinance extends BaseEntryObject implements Serializable{

	private static final long serialVersionUID = 1L;
	
	/**
	 * 所属公司编码	
	 */
	@Column
	private String suCompanyNum;
	/**
	 * 所属公司名称	
	 */
	@Column
	private String suCompanyName;
	/**
	 * 会计联系人	
	 */
	@Column
	private String accountingPerson;
	/**
	 * 联系人职务	
	 */
	@Column
	private String personPosition;
	/**
	 * 办公电话	
	 */
	@Column
	private String phone;
	/**
	 * 手机	
	 */
	@Column
	private String mobile;
	/**
	 * 开户银行	
	 */
	@ManyToOne
    @JoinColumn(name="openBankId")
	private Bank openBank;
	/**
	 * 银行账号	
	 */
	@Column
	private String bankAccount;
	/**
	 * 币别	
	 */
	@ManyToOne
    @JoinColumn(name="currencyId")
	private Currency currency;
	/**
	 * 账户名称	
	 */
	@Column
	private String accountName;
	public String getSuCompanyNum() {
		return suCompanyNum;
	}
	public void setSuCompanyNum(String suCompanyNum) {
		this.suCompanyNum = suCompanyNum;
	}
	public String getSuCompanyName() {
		return suCompanyName;
	}
	public void setSuCompanyName(String suCompanyName) {
		this.suCompanyName = suCompanyName;
	}
	public String getAccountingPerson() {
		return accountingPerson;
	}
	public void setAccountingPerson(String accountingPerson) {
		this.accountingPerson = accountingPerson;
	}
	public String getPersonPosition() {
		return personPosition;
	}
	public void setPersonPosition(String personPosition) {
		this.personPosition = personPosition;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public String getMobile() {
		return mobile;
	}
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getBankAccount() {
		return bankAccount;
	}
	public void setBankAccount(String bankAccount) {
		this.bankAccount = bankAccount;
	}
	public String getAccountName() {
		return accountName;
	}
	public void setAccountName(String accountName) {
		this.accountName = accountName;
	}
  public Bank getOpenBank() {
    return openBank;
  }
  public void setOpenBank(Bank openBank) {
    if(openBank != null &&("".equals(openBank.getUuid()) || openBank.getUuid()==null))
      this.openBank = null;
    else
        this.openBank = openBank;
  }
  public Currency getCurrency() {
    return currency;
  }
  public void setCurrency(Currency currency) {
    if(currency != null &&("".equals(currency.getUuid()) || currency.getUuid()==null))
      this.currency = null;
    else
        this.currency = currency;
  }

	
}
